<extend name="public@base5"/>
<block name="main">
    <div class="wrap">
        <ul class="nav nav-tabs">
            <li class="nav-item">
                <a class="nav-link active">{:lang('USER_ADMINUSERACTION_INDEX')}</a>
            </li>
        </ul>
        <form method="post" class="js-ajax-form margin-top-20">
            <php>$cycle_types=['0'=>'不限','1'=>'天','2'=>'小时','3'=>'永久']</php>
            <table class="table table-hover table-bordered">
                <thead>
                <tr>
                    <th>操作</th>
                    <th>积分更改</th>
                    <th>金币更改</th>
                    <th>奖励次数/周期</th>
                    <th width="80">{:lang('ACTIONS')}</th>
                </tr>
                </thead>
                <tbody>
                <foreach name="actions" item="vo">
                    <php></php>
                    <tr>
                        <td>{$vo.name} {$vo.action}</td>
                        <td>{$vo.score}</td>
                        <td>{$vo.coin}</td>
                        <th>
                            <eq name="vo.cycle_type" value="0">
                                不限制
                                <else/>
                                <eq name="vo.cycle_type" value="3">
                                    {$vo.reward_number}次/{$cycle_types[$vo['cycle_type']]}
                                    <else/>
                                    {$vo.reward_number}次/{$vo.cycle_time}{$cycle_types[$vo['cycle_type']]}
                                </eq>
                            </eq>
                        </th>
                        <td>
                            <a class="btn btn-xs btn-primary" href="{:url('AdminUserAction/edit')}?id={$vo.id}"
                               title="编辑"
                               data-toggle="tooltip">
                                <i class="fa fa-edit fa-fw"></i>
                            </a>
                        </td>
                    </tr>
                </foreach>
                </tbody>
            </table>
            <div class="pagination">{$page}</div>
        </form>
    </div>
</block>